home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
64'er
/
64ER_CD.iso
/
s85xx
/
s8502b.d64
/
listing 11
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
1995-03-30
|
3KB
|
100 lines
0 REM *****************************
1 REM * ADVENTURE-PROGRAMMIERKURS *
2 REM * *
3 REM * UEBUNGS-PROGRAMM *
4 REM *****************************
9 REM BASIC-ERWEITERUNG
10 DATA76,24,1,177,251,145,251,200,208,249,230,252,202,208,244,96,120,160,0,169
12 DATA160,132,251,133,252,162,32,32,11,1,169,224,132,251,133,252,162,32,32,11
14 DATA1,169,53,133,1,88,96:FORI=264TO310:READX:POKEI,X:NEXT:SYS264
16 FORI=710TO730:READX:POKEI,X:NEXT
18 DATA208,3,76,29,168,32,192,2,32,19,166,56,165,95,233,1,164,96,76,36,168
20 POKE40996,197:POKE40997,2:POKE1,54
22 FORI=43168TO43170:READX:POKEI,X:NEXT
24 FORI=704TO709:READX:POKEI,X:NEXT
26 DATA32,192,2,32,138,173,76,247,183
30 GOSUB52000: REM TABELLEN DEFFINIEREN
100 ZN=1:GOTO1130
1000 REM A C T I O N M O D U L
1010 GOSUB50000:REM BEFEHLSEINGABEMODUL
1100 REM GEHEN IN EIN NEUES ZIMMER
1105 IFVE<1ORVE>10THEN1200
1110 IFRI(VE)=0THENPRINT"KEIN WEG IN DIESE RICHTUNG !":GOTO1200
1120 ZN=RI(VE):PRINT"[147]"
1130 GOSUB 10000+ZN*100
1140 RESTORE 10000+ZN*100
1150 FORI=1TO10:READRI(I):NEXT
1200 GOTO1000
10000 REM ------- SPIELKARTE -------
10100 REM RAUM 1 ---------
10102 DATA 0,3,0,2,0,0,0,0,0,0
10105 PRINT"RAUM NUMMER 1"
10120 RETURN
10200 REM RAUM 2 ---------
10202 DATA 0,5,1,0,0,0,0,6,0,0
10205 PRINT"RAUM NUMMER 2"
10220 RETURN
10300 REM RAUM 3 ---------
10302 DATA 1,0,0,0,0,0,0,0,0,4
10305 PRINT"RAUM NUMMER 3"
10320 RETURN
10400 REM RAUM 4 ---------
10402 DATA 0,0,0,0,0,0,0,0,3,0
10405 PRINT"RAUM NUMMER 4"
10420 RETURN
10500 REM RAUM 5 ---------
10502 DATA 2,0,0,0,0,0,0,0,0,0
10505 PRINT"RAUM NUMMER 5"
10520 RETURN
10600 REM RAUM 6 ---------
10602 DATA 0,0,0,0,2,0,0,0,0,0
10605 PRINT"RAUM NUMMER 6"
10620 RETURN
50000 REM ****************************
50010 REM * BEFEHLSEINGABE *
50020 REM * BEFEHLSZERLEGUNG *
50030 REM * BEFEHLSCODIERUNG *
50040 REM ****************************
50050 IFUD=1THEN50220
50060 POKE198,0:BE$="":PRINT"WAS NUN ? ";
50070 POKE204,0
50080 GETX$:IFX$=""THEN50080
50090 IFPEEK(203)=1ORLEN(BE$)>68THENPRINT" ":POKE204,1:GOTO50140
50100 I=ASC(X$):IFI<65ORI>90THENIFI<>32ANDI<>20ANDI<>34THEN50080
50110 IFI=20ANDBE$=""THEN50080
50120 IFI=20THENPOKE204,1:PRINT"[157] [157][157]";:BE$=LEFT$(BE$,LEN(BE$)-1):GOTO50070
50130 PRINTX$;:BE$=BE$+X$:GOTO50080
50140 FORI=1TO10:BE$(I)="":NEXT:WZ=1:FORI=1TOLEN(BE$)
50150 :IFMID$(BE$,I,1)=" "THENGOSUB50190:GOTO50180
50160 :IFWZ>10THENPRINT"EINGABE IST ZU LANG !":I=LEN(BE$)+1:GOTO50180
50170 :BE$(WZ)=BE$(WZ)+MID$(BE$,I,1)
50180 NEXTI:GOTO50220
50190 IC=0:FORI1=1TOAZ:IFBE$(WZ)=AU$(I1)THENIC=1
50200 NEXTI1:IFIC=0THENWZ=WZ+1:RETURN
50210 BE$(WZ)="":RETURN
50220 IFUD=1THENUD=0:GOTO50240
50230 WZ=1:VE=0:OB=0:PE=0
50240 IC=0:G1=0:G2=0
50250 FORI=1TOVZ:IFBE$(WZ)=VE$(I)THENVE=I:IC=1
50251 IFLEN(BE$(WZ))<3THEN50260
50255 IFBE$(WZ)=LEFT$(VE$(I),LEN(BE$(WZ)))THENVE=I-VAL(RIGHT$(VE$(I),1)):IC=1
50260 NEXTI:IFIC=1THEN50350
50270 FORI=1TOGZ:IFBE$(WZ)<>GE$(I)THEN50300
50280 IC=1:IFG1=0THENG1=I
50290 G2=I:IFG2=G1THENG2=0
50300 NEXTI:IFIC=1THEN50350
50310 FORI=1TOOZ:IFBE$(WZ)=OB$(I)THENOB=I:IC=1
50320 NEXTI:IFIC=1THEN50350
50330 FORI=1TOPZ:IFBE$(WZ)=PE$(I)THENPE=I:IC=1
50340 NEXTI
50350 IFBE$(WZ)="UND"THENUD=1:IC=1
50360 IFIC=0THENPRINT"ICH KENNE ";BE$(WZ);" NICHT !":RETURN
50370 WZ=WZ+1:IFWZ>10ORBE$(WZ)=""ORUD=1THENRETURN
50380 IC=0:GOTO50250
52000 REM T A B E L L E N
52005 RESTORE52000
52010 REM VERBTABELLE ---------
52020 DATAN,S,W,O,NW,NO,SW,SO,RAUF,RUNTER
52100 VZ=10:DIMVE$(VZ):FORI=1TOVZ:READVE$(I):NEXT
53000 RETURN